<include file="public/header" title="所有分类"/>
    <div class="classreturn">
        <div class="content">
            <div class="ds-in-bl return">
                <a href="javascript:history.back(-1);"><img src="__STATIC__/images/return.png" alt="返回"></a>
            </div>
            <div class="ds-in-bl search">
                <form action="" method="post">
                    <div class="sear-input">
                        <a href="{:U('Goods/ajaxSearch')}">
                            <input type="text" value="" placeholder="请输入您所搜索的商品">
                        </a>
                    </div>
                </form>
            </div>
            <div class="ds-in-bl menu">
                <a href="javascript:void(0);"><img src="__STATIC__/images/class1.png" alt="菜单"></a>
            </div>
        </div>
    </div>

    <!--顶部隐藏菜单-s-->
    <include file="public/top_nav"/>
    <!--顶部隐藏菜单-e-->

   <style>
       .floor{
           position: relative;
           overflow-y: scroll;
       }
       .floor-top{
           margin-top: 0.5rem;
           margin-left: 0.5rem;
           float: left;
           width: 14.5rem;
           height: .875rem;
           font-weight: 500;
           font-size: .55rem;
           color: #333;
       }
       .floor-nav-list {
           float: left;
           width: 10rem;
           height: 0.875rem;
           margin-left: 0.1rem;
           overflow: hidden;
       }
       .nav-more-btn {
           float: right;
           font-size: .51rem;
           color: #666;
           margin-top: -0.55rem;
       }
       .floor-main {
           height: 6rem;
       }
       .floor-goods-list {
           float: left;
           width: 16rem;
           height: 9rem;
           margin-left: .4rem;
           overflow: hidden;
           background-color: #fff;
           border-left: 1px solid #eee;
       }
       .floor-goods-item {
           float: left;
           width: 7.8rem;
           padding: 0 0.5rem;
           height:  9rem;
           border-bottom: 1px solid #eee;
           border-right: 1px solid #eee;
           overflow: hidden;
           text-align: center;
       }
       .floor-goods-item .googs-title {
           font-size: .51rem;
           width: 6.5rem;
           height: 1.8rem;
           line-height: 0.6rem;
           padding-top: 0.6rem;
           color: #333;
       }
       .floor-goods-item .googs-price {
           font-size: 0.51rem;
           width: 6.5rem;
           height: 1.2rem;
           line-height: 0.6rem;
           color: #f71b1c;
       }
       .floor-goods-item .goods-pic {
           width: 6rem;
           height: 6rem;
           margin: auto;
       }
       </style>
<foreach name="cateList" item="v" key="k">
    <div class="floor floor{$k+1} w1224" style=" " >
        <div class="floor-top">
            <h3 class="floor-title">{$v[name]}</h3>
            <!--<div class="floor-nav-list clearfix">-->
                <!--<foreach name="v[tmenu]" item="v2" key="k2">-->
                    <!--<a class="floor-nav-item" href="{:U('Mobile/Goods/goodsList',array('id'=>$v2[id]))}">{$v2[name]}</a>-->
                <!--</foreach>-->
            <!--</div>-->
            <a class="nav-more-btn" href="{:U('Mobile/Goods/goodsList',array('id'=>$v[id]))}">更多<i>></i></a>
        </div>
        <div class="floor-main">

            <div class="floor-goods-list">
                <foreach name="v[hot_goods]" item="g" key="gk">
                    <a class="floor-goods-item" href="{:U('Mobile/Goods/goodsInfo',array('id'=>$g[goods_id]))}">
                        <div class="googs-title ellipsis-1">{$g[goods_name]|getSubstr=0,20}</div>
                        <div class="googs-price ellipsis-1"><if condition="session('user')">￥{$g[shop_price]}<else/>会员联采价请登录查看</if></div>
                        <div class="goods-pic"><img class="w-100" src="{$g[goods_id]|goods_thum_images=400,400}" alt=""></div>
                    </a>
                </foreach>
            </div>
        </div>
    </div>
</foreach>
<!--底部导航-start-->
<include file="public/footer_nav"/>
<!--底部导航-end-->
<script>
    $(function () {
        //点击切换2 3级分类
        var array=new Array();
        $('.category1 li').each(function(){
            array.push($(this).position().top-0);
        });
        $('.branchList').eq(0).show().siblings().hide();
        $('.category1 li').click(function() {
            var index = $(this).index() ;
            $('.category1').delay(200).animate({scrollTop:array[index]},300);
            $(this).addClass('cur').siblings().removeClass();
            $('.branchList').eq(index).show().siblings().hide();
            $('.category2').scrollTop(0);
        });
        $("html,body").css("overflow","auto");
    });
</script>
	</body>
</html>
